# Contributor: omni <omni+alpine@hack.org>
# Maintainer: omni <omni+alpine@hack.org>
pkgname=wormhole-william
pkgver=1.0.6
pkgrel=1
pkgdesc="Go implementation of Magic Wormhole"
arch="all"
url="https://github.com/psanford/wormhole-william"
license="MIT"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"

export GOPATH="$srcdir"
export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw"

build() {
	go build -ldflags="-s -w" -v .
}

check() {
	go test -v ./...
}

package() {
	install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname
}

sha512sums="767ac269931391ce6e50cf97b1035e7d5ce00004764e2bd30c14ee8d8f95f75eff094b759ca4da972f4f9fa4f708064ef09a6d8a4b3d45bb9494a7fca3bb2090  wormhole-william-1.0.6.tar.gz"
